<?php

namespace App\Listeners\Log;

use App\Events\LogCountEvent;
use App\Listeners\BaseListener;

class LogCountListener extends BaseListener
{
    /**
     * Handle the event.
     *
     * @param LogCountEvent $event
     * @return bool
     */
    public function handle(LogCountEvent $event)
    {
        $this->saveFileLog(__CLASS__, $event);

        $params = $event->params;

        service()->LogCountService->createLogByQueue($params);

        return true;
    }
}
